package com.bigfreakindeals.Models;

import java.util.ArrayList;
import java.util.List;

import android.util.Log;



public class UserProfile {
	private String firstname;
	private String lastname;
	
	private String username;

	private String email;
	private String password;
	private String sessionToken;
	private String prefferedUniversitySlug;
	public Coupons[] myCoupons;
	
	public PayPalObject paypalObj = null;
	/*setting*/
	private boolean isLogin;
	private boolean settings_rememberMe = false;
	private boolean settins_notificationNewDeals;
	private boolean settins_notificationbeanSays;
	
	public String university_preference_Lat = "";
	public String university_preference_Long = "";
	public String university_preference_Slug = "";
	
	private UniversityDeals lastSelectedSchool = null;
	private UniversityDeals homeUniversity = null;
	
	//private UniversityDeals lastSelectedSchoolNoDeal = null;
	
	
	/*keep per session*/
	
	private String FAQ = null;
	private String DEALSFAQ = null;
	private String TAndC = null;

	public UserProfile(){
	
	}
	public void setHomeUniversity(UniversityDeals deals){
		this.homeUniversity = deals;
	}
	
	 public UniversityDeals getHomeUniversity(){
		 return homeUniversity;
		 
	 }
	 

	/* public void setLastSelectedSchoolNoDeals(UniversityDeals deals){
			this.lastSelectedSchoolNoDeal = deals;
		}
		
		 public UniversityDeals getLastSelectedSchoolNoDeals(){
			 return lastSelectedSchoolNoDeal;
			 
		 }*/
	public void setLogin(boolean isLogin) {
		this.isLogin = isLogin;
	}

	public boolean isLogin() {
		return isLogin;
	}

	
	public void setSettings_rememberMe(int settings_rememberMe) {
		this.settings_rememberMe = ((settings_rememberMe==1)?true:false);
	}
	
	public boolean isSettings_rememberMe() {
		return settings_rememberMe;
	}

	
	public void setSettins_notificationNewDeals(int settins_notificationNewDeals) {
		this.settins_notificationNewDeals = ((settins_notificationNewDeals==1)?true:false);
	}


	public boolean isSettins_notificationNewDeals() {
		return settins_notificationNewDeals;
	}

	
	public void setSettins_notificationbeanSays(int settins_notificationbeanSays) {
		this.settins_notificationbeanSays = ((settins_notificationbeanSays==1)?true:false);
	}

	
	public boolean isSettins_notificationbeanSays() {
		return settins_notificationbeanSays;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getUsername() {
		return username;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPassword() {
		return password;
	}

	public void setSessionID(String sessionID) {
		this.sessionToken = sessionID;
	}

	public String getSessionID() {
		return sessionToken;
	}
	public void setPrefferedUniversitySlug(String prefferedUniversitySlug) {
		this.prefferedUniversitySlug = prefferedUniversitySlug;
	}
	public String getPrefferedUniversitySlug() {
		return prefferedUniversitySlug;
	}
	
	public void setFAQ(String fAQ) {
		this.FAQ = "<style type=\"text/css\">body{background-color: #ffffff; color: #000000; font-size: 12px;}</style>"+fAQ;
		
	}
	public String getFAQ() {
		return FAQ;
	}
	public void setDEALSFAQ(String dEALSFAQ) {
		this.DEALSFAQ = "<style type=\"text/css\">body{background-color: #ffffff; color: #000000; font-size: 12px;}</style>"+DEALSFAQ;
	}
	public String getDEALSFAQ() {
		return DEALSFAQ;
	}
	public void setTAndC(String tAndC) {
		this.TAndC = "<style type=\"text/css\">body{background-color: #ffffff; color: #000000; font-size: 12px;}</style>"+tAndC;
	}
	public String getTAndC() {
		return TAndC;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getEmail() {
		return email;
	}
	public void setlastSelectedSchool(UniversityDeals lastSelectedSchool) {
		System.out.println("setLastSelectedSchool: "+lastSelectedSchool.getSchoolName()+" "+lastSelectedSchool.getImageSlug());
		this.lastSelectedSchool = lastSelectedSchool;
	}
	public UniversityDeals getlastSelectedSchool() {
		return lastSelectedSchool;
	}
	public void setFirstname(String firstname) {
		this.firstname = firstname;
	}
	public String getFirstname() {
		return firstname;
	}
	public void setLastname(String lastname) {
		this.lastname = lastname;
	}
	public String getLastname() {
		return lastname;
	}
	public int findCouponIndex(Coupons coupon){
	for (int i = 0 ; i<myCoupons.length;i++){
		
		if (myCoupons[i].dealID.equals(coupon.dealID))
			return i;
	}
	return -1;
	
	
		
	}

}
